#define _CRT_SECURE_NO_WARNINGS	

#include <stdio.h>

int main()
{
    int cm;
    scanf("%d", &cm);
    double meters = cm / 100.0;
    int foot = (int)(meters / 0.3048);
    int inch = (int)(((meters / 0.3048) - foot) * 12);
    printf("%d %d\n", foot, inch);
    return 0;
}